<template>
  <div class="resign_item">
    <van-row type="flex" justify="space-between" align="center" class="name_staff">
      <van-col span="11" class="time">
        姓名：<span>{{ resignItem.user_name }}</span>
      </van-col>
      <van-col span="11" class="time">
        工号：<span>{{ resignItem.work_number }}</span>
      </van-col>
    </van-row>

    <van-row type="flex" justify="space-between" align="center" class="resign_status">
      <van-col span="11" class="status">
        辞职状态：<van-tag type="primary" >{{ resignStatusObj[resignItem.status] || '未知' }}</van-tag>
      </van-col>
    </van-row>

    <van-row class="resign_dept" type="flex" justify="space-between" >
      <van-col span="5" class="title">
        <span>所属部门：</span>
      </van-col>
      <van-col span="19" class="reason_text">
        <span>{{ resignItem.department}}</span>
      </van-col>
    </van-row>

    <van-row class="resign_reason" type="flex" justify="space-between" >
      <van-col span="5" class="title">
        <span>辞职理由：</span>
      </van-col>
      <van-col span="19" class="reason_text">
        <span>{{ resignItem.resign_reason}}</span>
      </van-col>
    </van-row>

    <van-row type="flex" justify="space-between" align="center" class="resign_time">
      <van-col span="5" class="title">
        <span>辞职日期：</span>
      </van-col>
      <van-col span="19" class="time">
        <span>{{ resignItem.resign_time }}</span>
      </van-col>
    </van-row>

    <van-row type="flex" justify="space-between" align="center" class="apply_time">
      <van-col span="5" class="title">
        <span>申请日期：</span>
      </van-col>
      <van-col span="19" class="time">
        <span>{{ resignItem.create_time }}</span>
      </van-col>
    </van-row>

  </div>
</template>

<script>

const resignStatusObj = {
  '0': '申请中',
  '1': '已批准',
  '2': '已拒绝',
  '3': '已失效'
};

export default {
  name: "resignItem",
  props: ['resignItem'],
  data(){
    return {
      resignStatusObj,

    }
  }
}
</script>

<style lang="scss" scoped>
.resign_item {
  background-color: #ffffff;
  border-bottom: 0.8px solid #e6e6e6;
  margin: 0;
  padding: 9px 8px 9px 12px;
  font-size: 14px;

  .name_staff{

  }

  .resign_status{
    margin: 8px 0;
    .status{
      //font-weight: bold;
    }
  }

  .resign_reason{
    margin: 8px 0 0 0;
    .reason_text{
      //border-bottom: 1px solid #e6e6e6;
      padding-bottom: 8px;
      line-height: 1.33em;
      letter-spacing: 1.3px;
      text-align: justify;
    }
  }

  .resign_time{
    margin: 2px 0 8px 0;
    .time{
      color: #EE0A24;
      font-weight: bold;
    }
  }
}
</style>
